<?php 
$item = $this->item;
$prefix = $item->getPrefix();
$timestamp = $item->getTimestamp();
$date = date("F j, Y", $timestamp);				
$id = $item->getSource() . "_" . $item->getID();

echo "<div class='date' id='".date("YMj", $timestamp)."'>$date</div>";
echo $this->partial('timeline/item.phtml', array('item' => $item, 'admin' => $this->admin, 'model' => $this->model, 'disqus' => $this->disqus, 'googlefc' => $this->googlefc));

?>

<?php
if ($this->disqus) : ?>
<div id="disqus_thread"></div>
<script type="text/javascript" src="http://disqus.com/forums/<?= $this->disqus ?>/embed.js"></script>
<noscript><a href="http://<?= $this->disqus ?>.disqus.com/?url=ref">View the discussion thread.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
<?php elseif ($this->googlefc) : ?>
<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<!-- Define the div tag where the gadget will be inserted. -->
<?php $div_id = md5(time()); ?>
<div id="div-<?= $div_id ?>" class='item_comments' style="width:480px;border:1px solid #cccccc;"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#e0ecff';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['DEFAULT_COMMENT_TEXT'] = '- add your comment here -';
skin['HEADER_TEXT'] = 'Comments';
skin['POSTS_PER_PAGE'] = '5';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderWallGadget(
 { id: 'div-<?= $div_id ?>',
   site: '<?= $this->googlefc ?>',
   'view-params':{"disableMinMax":"true","scope":"ID","allowAnonymousPost":"true","docId":"<?= md5($id) ?>","startMaximized":"true"}
 },
  skin);
</script>
<?php else : ?>
<div class='item_comments' id='comments_<?= $id ?>'>
	<?= $this->action('index', 'comments', null, array('source' => $item->getSource(), 'item' => $item->getID())); ?>
</div>		
<div class='item_add_comment' id='add_comment_<?= $id ?>'>
	<?= $this->action('form', 'comments', null, array('source' => $item->getSource(), 'item' => $item->getID())); ?>
</div>		
<?php endif ?>
